function getUniqueValues(list, key) {
    var jsonList
    if (typeof list == "string") {
        jsonList = JSON.parse(list);
    } else {
        jsonList = list;
    }
    return jsonList.reduce(function (accumulator, item) {
        if (accumulator.indexOf(item[key]) === -1 && typeof item[key] !== 'undefined' && item[key] != null) {
            accumulator.push(item[key]);
        }
        return accumulator;
    }, []);
}
